SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE PROCEDURE [dbo].[usp_DeleteAvailableField] ( @JOL_Field_No INT )
AS 
    DECLARE @Field VARCHAR(50)
    SET @Field = (
                   SELECT   (JOL_Field_Campus+JOL_Field_Name)
                   FROM     dbo.JOL_AvailableField
                   WHERE    JOL_Field_No = @JOL_Field_No
                 )
    DELETE  FROM dbo.JOL_ApplyField
    WHERE   JOL_Field_ApplyPosition = @Field
    DELETE  FROM dbo.JOL_AvailableField
    WHERE   JOL_Field_No = @JOL_Field_No


GO
